package data.visu.structures;


/**
 * @author Charles Perin
 * 29 mars 2011
 * LIMSI - INRIA Rennes
 * charles.perin@free.fr
 *
 */
public class RangeAndValueAndString {

	private Range range;
	private ValueAndString value;

	// constructeur
	public RangeAndValueAndString(Range range, ValueAndString value) {
		this.range = range;
		this.value = value;
	}

	public ValueAndString getValue() {
		return value;
	}

	public void setValue(ValueAndString newValue) {
		this.value = newValue;
	}

	public Range getRange() {
		return range;
	}

	public void setRange(Range range) {
		this.range = range;
	}

	public String toString() {
		if (range != null)
			return "Range: " + this.range.toString() + " , value: "
					+ this.value;
		else {
			System.err.println("toString de range null");
			return "";
		}
	}
	

	public boolean equalsCustom(RangeAndValueAndString rtd){
		if(rtd.getRange().getMin()==range.getMin()
				&& rtd.getRange().getMax()==range.getMax()
				&& rtd.getValue().equals(value))
			return true;
		else return false;
	}
}
